$(function (){
    let $downloadbtn = $(".test-download");

    $downloadbtn.click(function (){
        let sIdcn = $("#idcn option:selected").val();
        let Start_time = $("#start_time").val();
        let End_time = $("#end_time").val();
        let sGdtime = $("#zb option:selected").val();
        let sGdjj = $("#jj option:selected").val();


        var json  = {
            "idcn_id":sIdcn,
            "start_time":Start_time,
            "end_time":End_time,
            "zb_id":sGdtime,
            "jj_id":sGdjj,
        };

        var form = $("<form>");
        form.attr('style', 'display:none');
        form.attr('target', '');
        form.attr('method', 'post'); //请求方式
        form.attr('action', '/admin/admin/gd/download/');//请求地址

        var input1 = $('<input>');//将你请求的数据模仿成一个input表单
        input1.attr('type', 'hidden');
        input1.attr('name', 'json');//该输入框的name
        input1.attr('value',JSON.stringify(json));//该输入框的值

        $('body').append(form);
        form.append(input1);

        form.submit();
        form.remove();
    });

});